package com.ssx.entity;

import java.util.List;

/**
 * @Package com.ssx.pojo
 * @ClassName Pager
 * @Copyright: Copyright (c) 2020
 * @Date 2020/10/8 12:30
 * @Company www.sudaoxi.com.cn
 * @Author 苏道羲
 * @Version 1.0
 * @Description
 */
public class Pager<T> {
    private int total;
    private List<T> rows;
    // 返回状态码   (默认1:成功,其它:失败)
    private int code = 1;
    // 返回的中文消息
    private String message;

    public Pager() {
    }

    public Pager(int total, List<T> rows) {
        this.total = total;
        this.rows = rows;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public List<T> getRows() {
        return rows;
    }

    public void setRows(List<T> rows) {
        this.rows = rows;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    @Override
    public String toString() {
        return "Pager{" +
                "total=" + total +
                ", rows=" + rows +
                ", code=" + code +
                ", message='" + message + '\'' +
                '}';
    }
}
